#include "stopwatch.h"

StopWatch::StopWatch() : startTime(0) {}

void StopWatch::start()
{
  startTime = std::clock();
}

double StopWatch::stop()
{
  clock_t total = std::clock()- startTime; //get elapsed time
  return static_cast<double>(total)/CLOCKS_PER_SEC;
}

StopWatch::~StopWatch()
{
}
